<%@ page contentType="text/html;charset=UTF-8" import="java.sql.*"%>
<%@ page import="com.aptech.restrant.Bean.*,  com.aptech.restrant.Model.*" %>
<jsp:useBean id="connDB0" scope="page" class="beans.connDB"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>

 <script type="text/javascript">	
function tupian(idt){
    var nametu="xiaotu"+idt;
    var tp = document.getElementById(nametu);
    tp.src="../images/ico05.gif";//图片ico04为白色的正方形
	
	for(var i=1;i<30;i++)
	{
	  
	  var nametu2="xiaotu"+i;
	  if(i!=idt*1)
	  {
	    var tp2=document.getElementById('xiaotu'+i);
		if(tp2!=undefined)
	    {tp2.src="../images/ico06.gif";}//图片ico06为蓝色的正方形
	  }
	}
}

function list(idstr){
	var name1="subtree"+idstr;
	var name2="img"+idstr;
	var objectobj=document.getElementById(name1);
	var imgobj=document.getElementById(name2);
	
	
	//alert(imgobj);
	
	if(objectobj.style.display=="none"){
		for(i=1;i<10;i++){
			var name3="img"+i;
			var name="subtree"+i;
			var o=document.getElementById(name);
			if(o!=undefined){
				o.style.display="none";
				var image=document.getElementById(name3);
				//alert(image);
				image.src="../images/ico04.gif";
			}
		}
		objectobj.style.display="block";
		imgobj.src="../images/ico03.gif";
	}
	else{
		objectobj.style.display="none";
		imgobj.src="../images/ico04.gif";
	}
}

	function loginout() {
		alert("您已成功退出学生成绩管理系统！");
		window.top.location.reload();
	}
xues
</SCRIPT>

<body>
  <%
				  
				  	if(session.getAttribute("name")!=null)
				  	{
				  		AdminBean admin = (AdminBean)session.getAttribute("name");
				
				  		
				   %>

<table width="198" border="0" cellpadding="0" cellspacing="0" class="left-table01">
  <tr>
    <TD>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td width="100%" height="55" background="../images/nav01.gif">
				<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
				  <tr>
					<td width="25%" rowspan="2"><img src="../images/ico02.gif" width="35" height="35" /></td>
					<td width="75%" height="22" class="left-font01"><%=admin.getAdminName()%></>您好</td>
				  </tr>
				  <tr>
					<td height="22" class="left-font01">
						[&nbsp;<a href="loginout.jsp" ><font size="2" color="#996666">退出</font></a>&nbsp;]&nbsp;
						[&nbsp;<a href="adminmodify.jsp" target="MainForm"> <font size="2" color="#996666">修改密码</font></a>&nbsp;]
					</td>
				  </tr>
				</table>
			</td>
		  </tr>	</table>
		<% }%>
		

		<!--  基本信息管理开始    -->
		<TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
          <tr>
            <td height="29">
				<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<td width="8%"><img name="img1" id="img1" src="../images/ico04.gif" width="8" height="11" /></td>
						<td width="92%">
								<a href="defualt.jsp" target="MainForm" >基本信息管理</a></td>
					</tr>
				</table>
			</td>
          </tr>		  
        </TABLE>
		<!--  结束    -->
		
		
               


		<!--  系统管理结束    -->	 

	  <!--  菜单管理开始    -->
	  <%
		AdminBean admin2 = (AdminBean)session.getAttribute("name");
  		int quanxian2;
  		ResultSet rs2=connDB0.executeQuery("select * from  tb_admin where name='"+admin2.getAdminName()+"'");
  		if(rs2.next()){
  			quanxian2=rs2.getInt("quanxian");
	  		if(quanxian2==2){
		%>
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
          <tr>
            <td height="29"><table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="8%" height="12"><img name="img3" id="img3" src="../images/ico04.gif" width="8" height="11" /></td>
                  <td width="92%"><a href="javascript:" target="MainForm" class="left-font03" onClick="list('3');" >学生成绩管理</a></td>
                </tr>
            </table></td>
          </tr>
      </table>
	  
	  <table id="subtree3" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="left-table02">
        
		<tr>
          <td width="9%" height="20" ><img id="xiaotu23" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="studentscore/stumenu.jsp" target="MainForm">成绩管理</a></td>
        </tr>

      </table>
      <% }}%>

	  <!--  菜单管理结束    -->


	  

	  <!-- 留言管理结束-->
<!--  订单管理开始    -->
<%
		AdminBean admin4 = (AdminBean)session.getAttribute("name");
  		int quanxian4;
  		ResultSet rs4=connDB0.executeQuery("select * from  tb_admin where name='"+admin4.getAdminName()+"'");
  		if(rs4.next()){
  			quanxian4=rs4.getInt("quanxian");
	  		if(quanxian4==1){
		%>
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
          <tr>
            <td height="29"><table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="8%" height="12"><img name="img4" id="img4" src="../images/ico04.gif" width="8" height="11" /></td>
                  <td width="92%"><a href="javascript:" target="MainForm" class="left-font03" onClick="list('4');" >成绩管理</a></td>
                </tr>
            </table></td>
          </tr>
      </table>
	  
	  <table id="subtree4" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="left-table02">
        <tr>
          <td width="9%" height="20" ><img id="xiaotu11" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/chengji.jsp"  target="MainForm">查看成绩</a></td>
        </tr>
		<tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/orderbyxuehao.jsp"  target="MainForm">按学号排序</a></td>
        </tr>
        <tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/orderbyzongfen.jsp"  target="MainForm">总分查询</a></td>
        </tr>
        <tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/average.jsp"  target="MainForm">各科平均分</a></td>
        </tr>
        <tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/max.jsp"  target="MainForm">单科最高分</a></td>
        </tr>
        <tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/min.jsp"  target="MainForm">单科最低分</a></td>
        </tr>
        <tr>
          <td width="9%" height="20" ><img id="xiaotu12" src="../images/ico06.gif" width="8" height="12" /></td>
          <td width="91%"><a href="tongji/85fenyishang.jsp"  target="MainForm">>=85分</a></td>
        </tr>
      </table>
	  <!--  订单管理结束    -->
<%}} %>
		
     <!-- 健康饮食开始 -->
     		<%
		AdminBean admin1 = (AdminBean)session.getAttribute("name");
  		int quanxian1;
  		ResultSet rs1=connDB0.executeQuery("select * from  tb_admin where name='"+admin1.getAdminName()+"'");
  		if(rs1.next()){
  			quanxian1=rs1.getInt("quanxian");
	  		if(quanxian1==1){
		%>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
        <tr>
          <td height="29"><table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="8%"><img name="img6" id="img6" src="../images/ico04.gif" width="8" height="11" /></td>
                <td width="92%"><a href="teacherManage/teachermanage.jsp" target="MainForm" class="left-font033" onClick="list('6');" >教师信息管理</a></td>
              </tr>
          </table></td>
        </tr>
      </table>

	 <!-- 健康饮食结束-->
	<%}}%>
	 <!--会员管理开始-->
	 <%
		AdminBean admin3 = (AdminBean)session.getAttribute("name");
  		int quanxian3;
  		ResultSet rs3=connDB0.executeQuery("select * from  tb_admin where name='"+admin3.getAdminName()+"'");
  		if(rs3.next()){
  			quanxian3=rs3.getInt("quanxian");
	  		if(quanxian3==3){
		%>
		<TABLE width="100%" border="0" cellpadding="0" cellspacing="0" class="left-table03">
          <tr>
            <td height="29">
				<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<td width="8%"><img name="img7" id="img7" src="../images/ico04.gif" width="8" height="11" /></td>
						<td width="92%">
								<a href="javascript:" target="MainForm" class="left-font033" onClick="list('7');" >成绩查询</a></td>
					</tr>
				</table>
			</td>
          </tr>		  
        </TABLE>

		<table id="subtree7" style="DISPLAY: none" width="80%" border="0" align="center" cellpadding="0" 
				cellspacing="0" class="left-table02">
			<tr>
				  <td width="9%" height="23" ><img id="xiaotu16" src="../images/ico06.gif" width="8" height="12" /></td>
				  <td width="91%"><a href="studentchaxun/chengjichaxun.jsp" target="MainForm">成绩查询</a></td>
			</tr>
			
      </table>
      <%}}%>
		<!--  会员管理结束    -->
		<!-- 留言管理开始 -->


	  </TD>
  </tr>

</table>
</body>
</html>
